<!doctype html>
<html lang="zh-CN">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>添加交易 - 极简Todo系统</title>
    <link
      href="https://cdn.bootcdn.net/ajax/libs/tailwindcss/2.2.19/tailwind.min.css"
      rel="stylesheet"
    />
    <link
      rel="stylesheet"
      href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css"
    />
    <style>
      body {
        height: 100vh;
        font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial,
          sans-serif;
        background-color: #f2f2f7;
      }

      .ios-status-bar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        height: 44px;
        padding: 0 16px;
        font-size: 12px;
        font-weight: 600;
        color: #000;
        background-color: #ffffff;
      }

      .nav-header {
        display: flex;
        align-items: center;
        padding: 10px 16px;
        background-color: white;
        border-bottom: 1px solid #f0f0f0;
      }

      .form-section {
        padding: 16px;
        margin: 16px;
        background-color: white;
        border-radius: 10px;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
      }

      .form-item {
        margin-bottom: 16px;
      }

      .form-label {
        display: block;
        margin-bottom: 8px;
        font-size: 14px;
        color: #6b7280;
      }

      .form-input {
        width: 100%;
        padding: 12px;
        font-size: 16px;
        background-color: #f9fafb;
        border: 1px solid #e5e7eb;
        border-radius: 8px;
      }

      .type-selector {
        display: flex;
        margin-bottom: 16px;
      }

      .type-option {
        flex: 1;
        padding: 12px;
        font-weight: 600;
        text-align: center;
        cursor: pointer;
        border-radius: 8px;
      }

      .type-option.active {
        color: white;
        background-color: #007aff;
      }

      .type-option:not(.active) {
        color: #6b7280;
        background-color: #f2f2f7;
      }

      .category-grid {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 12px;
      }

      .category-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 12px 8px;
        cursor: pointer;
        background-color: #f2f2f7;
        border-radius: 8px;
      }

      .category-item.active {
        background-color: rgba(0, 122, 255, 0.1);
        border: 1px solid #007aff;
      }

      .category-icon {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        margin-bottom: 8px;
        color: white;
        border-radius: 20px;
      }

      .category-name {
        font-size: 12px;
        text-align: center;
      }

      .submit-button {
        width: 100%;
        padding: 15px;
        font-size: 16px;
        font-weight: 600;
        color: white;
        text-align: center;
        background-color: #007aff;
        border-radius: 10px;
      }
    </style>
  </head>
  <body>
    <!-- iOS 状态栏 -->
    <div class="ios-status-bar">
      <div>9:41</div>
      <div class="flex space-x-2">
        <i class="fas fa-signal"></i>
        <i class="fas fa-wifi"></i>
        <i class="fas fa-battery-full"></i>
      </div>
    </div>

    <div class="nav-header">
      <a href="finance.html" class="text-blue-500">
        <i class="fas fa-chevron-left mr-2"></i>
        取消
      </a>
      <h1 class="text-xl font-semibold mx-auto">添加交易</h1>
      <button class="text-blue-500 font-semibold">保存</button>
    </div>

    <div class="type-selector p-4">
      <div class="type-option active mr-4">支出</div>
      <div class="type-option">收入</div>
    </div>

    <div class="form-section">
      <div class="form-item">
        <label class="form-label">金额</label>
        <div class="relative">
          <span class="absolute left-3 top-3 text-gray-500 text-lg">¥</span>
          <input type="text" class="form-input pl-8" placeholder="0.00" />
        </div>
      </div>

      <div class="form-item">
        <label class="form-label">分类</label>
        <div class="category-grid">
          <div class="category-item active">
            <div class="category-icon" style="background-color: #ff3b30">
              <i class="fas fa-utensils"></i>
            </div>
            <div class="category-name">餐饮</div>
          </div>

          <div class="category-item">
            <div class="category-icon" style="background-color: #ff9500">
              <i class="fas fa-shopping-cart"></i>
            </div>
            <div class="category-name">购物</div>
          </div>

          <div class="category-item">
            <div class="category-icon" style="background-color: #34c759">
              <i class="fas fa-bus"></i>
            </div>
            <div class="category-name">交通</div>
          </div>

          <div class="category-item">
            <div class="category-icon" style="background-color: #5856d6">
              <i class="fas fa-home"></i>
            </div>
            <div class="category-name">住房</div>
          </div>

          <div class="category-item">
            <div class="category-icon" style="background-color: #007aff">
              <i class="fas fa-tshirt"></i>
            </div>
            <div class="category-name">服饰</div>
          </div>

          <div class="category-item">
            <div class="category-icon" style="background-color: #ff2d55">
              <i class="fas fa-heartbeat"></i>
            </div>
            <div class="category-name">医疗</div>
          </div>

          <div class="category-item">
            <div class="category-icon" style="background-color: #af52de">
              <i class="fas fa-gamepad"></i>
            </div>
            <div class="category-name">娱乐</div>
          </div>

          <div class="category-item">
            <div class="category-icon" style="background-color: #a2845e">
              <i class="fas fa-ellipsis-h"></i>
            </div>
            <div class="category-name">其他</div>
          </div>
        </div>
      </div>

      <div class="form-item">
        <label class="form-label">备注</label>
        <input type="text" class="form-input" placeholder="添加备注..." />
      </div>

      <div class="form-item">
        <label class="form-label">日期</label>
        <div class="flex items-center justify-between p-3 bg-gray-50 rounded-lg">
          <span>2023年6月15日</span>
          <i class="fas fa-calendar text-gray-400"></i>
        </div>
      </div>
    </div>

    <div class="p-4">
      <button class="submit-button">保存</button>
    </div>
  </body>
</html>
